<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ page import="com.msmall.base.util.ConstantDB" language="java"%>
<c:set var="AVALIABLE" value="<%=ConstantDB.AVALIABLE%>"></c:set>
<c:set var="UNAVALIABLE" value="<%=ConstantDB.UNAVALIABLE%>"></c:set>

<div>
	提交后，必须刷新内存
	<br/>
	<form id="f_segment" action="<c:url value='/admin/dpt/saveSegment.do'/>" method="post" enctype="multipart/form-data">
		<input type="hidden" name="segment.segmentid" value="${segment.segmentid}">
		<table id="t_segment_detail">
			<tr>
			<th width="75px">次要栏目名称</th>
				<td>
					<input type="text" name="segment.title" value="${segment.title}"/>
				</td>
			</tr>
			<tr>
			<th width="75px">父分类</th>
				<td>
					<select name="segment.parentid">
						<ms:dpt type="seg" property="${segment.segmentid}" action="select"></ms:dpt>
					</select>
				</td>
			</tr>
			<tr>
			<th width="75px">是否可用</th>
				<td>
					<input type="checkbox" id="f_segment_enabled" name="segment.enabled" value="${AVALIABLE}"/>
					<script type="text/javascript">
						var segmentEnabled = "<c:out value='${segment.enabled}' />";
						var segmentEnabledValue = parseInt(segmentEnabled);
						if(segmentEnabledValue == 1){
							$("#f_segment_enabled").attr("checked",true);
					  	}
					</script>
				</td>
			</tr>
			<tr>
			<th width="75px">显示顺序</th>
				<td>
					<input type="text" name="segment.orders" value="${segment.orders}"/>
				</td>
			</tr>
			<tr>
			<th width="75px">描述</th>
				<td>
					<textarea rows="20" cols="20" name="segment.description"><c:out value="${segment.description}"/></textarea>
				</td>
			</tr>
			<tr>
				<td><input type="submit" name="保存" value="保存"/></td>
			</tr>
		</table>
	</form>
</div>
